package com.jx.gn.builder;

import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutImageMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutVoiceMessage;

public class VoiceBuilder extends AbstractBuilder {
    @Override
    public WxMpXmlOutMessage build(String content, WxMpXmlMessage wxMessage, WxMpService service) {

        WxMpXmlOutVoiceMessage wxMpXmlOutVoiceMessage = WxMpXmlOutMessage.VOICE().mediaId(wxMessage.getMediaId())
                .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser())
                .build();
        return wxMpXmlOutVoiceMessage;
    }
}
